import http from "@/api";

// 获取Ui模块分类树
export const getUiTestCatTreeApi = (params) => {
    return http.get(`/api/ui/uiTestCat/`, params);
};

export const postUiTestCatApi = (params) => {
    return http.post(`/api/ui/uiTestCat/`, params);
};

// uiTestCase

export const getUiTestCaseListApi = (params) => {
    return http.get(`/api/ui/uiTestCase/`, params);
};

export const getUiTestCaseApi = (params) => {
    return http.get(`/api/ui/uiTestCase/${params}/`);
};

export const postUiTestCaseApi = (params) => {
    return http.post(`/api/ui/uiTestCase/`, params);
};

// 上传UI测试文件
export const postUiCaseFile = (params) => {
    return http.post(`/api/ui/uiCaseFile/`, params);
};

// run runUiTestCase
export const postRunUiTestCase= (params)=>{
    return http.post(`/api/ui/runUiTestCase/`, params);
}


export const getUiTestCaseLogListApi = (params) => {
    return http.get(`/api/ui/uiTestCaseLog/`, params);
};

export const getUiTestCaseLogApi = (params) => {
    return http.get(`/api/ui/uiTestCaseLog/${params}/`);
};
